var e = require;
var t = module;
var o = exports;
var n,
    i = o,
    a =
        ((n = function (e, t) {
            return (n =
                Object.setPrototypeOf ||
                ({__proto__: []} instanceof Array &&
                    function (e, t) {
                        e.__proto__ = t;
                    }) ||
                function (e, t) {
                    for (var o in t) t.hasOwnProperty(o) && (e[o] = t[o]);
                })(e, t);
        }),
        function (e, t) {
            function o() {
                this.constructor = e;
            }
            n(e, t), (e.prototype = null === t ? Object.create(t) : ((o.prototype = t.prototype), new o()));
        }),
    r = function (e, t, o, n) {
        var i,
            a = arguments.length,
            r = a < 3 ? t : null === n ? (n = Object.getOwnPropertyDescriptor(t, o)) : n;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(e, t, o, n);
        else
            for (var s = e.length - 1; s >= 0; s--)
                (i = e[s]) && (r = (a < 3 ? i(r) : a > 3 ? i(t, o, r) : i(t, o)) || r);
        return a > 3 && r && Object.defineProperty(t, o, r), r;
    };
Object.defineProperty(i, "__esModule", {value: !0});
var s = e("BaseComponent"),
    c = cc._decorator,
    l = c.ccclass,
    d = c.property,
    u = (function (e) {
        function t() {
            var t = (null !== e && e.apply(this, arguments)) || this;
            return (t.node_mask = null), (t.node_btn_close = null), (t.oppoCloseViewIsShowInter = !1), t;
        }
        return (
            a(t, e),
            (t.prototype.addEvent = function () {
                e.prototype.addEvent.call(this),
                    null != this.node_mask &&
                        this.node_mask.on(game.EngineEventType.NodeEvent.click, this.onClickMask, this),
                    null != this.node_btn_close &&
                        this.node_btn_close.on(game.EngineEventType.NodeEvent.click, this.onClickClose, this);
            }),
            (t.prototype.onClickMask = function () {
                game.AudioManager.playBtnEffect(), this.closeView(!0);
            }),
            (t.prototype.onClickClose = function () {
                game.AudioManager.playBtnEffect(), this.closeView(!0);
            }),
            (t.prototype.closeView = function (e) {
                void 0 === e && (e = !1),
                    ad.curr_platform == window.ad.Platform.QQ && ad.adInterface.showInterstitial(),
                    ad.curr_platform == window.ad.Platform.WECHAT && ad.adInterface.showInterstitial(),
                    ad.curr_platform == window.ad.Platform.TOU_TIAO && ad.adInterface.showInterstitial(),
                    game.PopupManager.instance.removePopupView(this.node, e);
            }),
            (t.prototype.removeEvent = function () {
                e.prototype.removeEvent.call(this),
                    null != this.node_mask &&
                        this.node_mask.off(game.EngineEventType.NodeEvent.click, this.onClickMask, this),
                    null != this.node_btn_close &&
                        this.node_btn_close.off(game.EngineEventType.NodeEvent.click, this.onClickClose, this);
            }),
            r([d(cc.Node)], t.prototype, "node_mask", void 0),
            r([d(cc.Node)], t.prototype, "node_btn_close", void 0),
            r([d(cc.Boolean)], t.prototype, "oppoCloseViewIsShowInter", void 0),
            r([l], t)
        );
    })(s.default);
i.default = u;
